home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / graphics / createrastport.c < prev    next >
C/C++ Source or Header  |  1996-10-31  |  1KB  |  72 lines

  1. /*
  2.     (C) 1995 AROS - The Amiga Replacement OS
  3.     $Id: createrastport.c,v 1.2 1996/10/31 13:47:08 aros Exp $
  4.  
  5.     Desc: AROS Graphics function CreateRastPort()
  6.     Lang: english
  7. */
  8. #include "graphics_intern.h"
  9. #include <exec/memory.h>
  10. #include <graphics/rastport.h>
  11. #include <clib/exec_protos.h>
  12.  
  13. /*****************************************************************************
  14.  
  15.     NAME */
  16.     #include <graphics/rastport.h>
  17.     #include <clib/graphics_protos.h>
  18.  
  19.     AROS_LH0(struct RastPort *, CreateRastPort,
  20.  
  21. /*  SYNOPSIS */
  22.  
  23. /*  LOCATION */
  24.     struct GfxBase *, GfxBase, 177, Graphics)
  25.  
  26. /*  FUNCTION
  27.     This function creates a new RastPort.
  28.  
  29.     INPUTS
  30.     None.
  31.  
  32.     RESULT
  33.     A pointer to a new RastPort or NULL if there was not enough memory
  34.     to perform the operation.
  35.  
  36.     NOTES
  37.     This function is AROS specific. For compatibility, there is a
  38.     function in aros.lib which does the same on Amiga.
  39.  
  40.     EXAMPLE
  41.  
  42.     BUGS
  43.  
  44.     SEE ALSO
  45.  
  46.     INTERNALS
  47.  
  48.     HISTORY
  49.     29-10-95    digulla automatically created from
  50.                 graphics_lib.fd and clib/graphics_protos.h
  51.  
  52. *****************************************************************************/
  53. {
  54.     AROS_LIBFUNC_INIT
  55.     AROS_LIBBASE_EXT_DECL(struct GfxBase *,GfxBase)
  56.     struct RastPort * newRP;
  57.  
  58.     newRP = AllocMem (sizeof (struct RastPort), MEMF_ANY);
  59.  
  60.     if (newRP)
  61.     {
  62.     if (!InitRastPort (newRP))
  63.     {
  64.         FreeMem (newRP, sizeof (struct RastPort));
  65.         newRP = NULL;
  66.     }
  67.     }
  68.  
  69.     return newRP;
  70.     AROS_LIBFUNC_EXIT
  71. } /* CreateRastPort */
  72.